package com.ruoyi.app.service.impl;


import com.ruoyi.app.domain.Balance;
import com.ruoyi.app.mapper.BalanceMapper;
import com.ruoyi.app.service.BalanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
* @author 75460
* @description 针对表【balance(余额)】的数据库操作Service实现
* @createDate 2025-05-20 09:08:18
*/
@Service
public class BalanceServiceImpl implements BalanceService {
    @Autowired
    private BalanceMapper balanceMapper;
    @Override
    public Balance balanceById(Integer patientId) {
        return balanceMapper.balanceById(patientId);
    }

    @Override
    public void recharge(Integer patientId, BigDecimal price) {
        balanceMapper.recharge(patientId,price);
    }

    @Override
    public void Updaterecharge(Integer patientId, BigDecimal result) {
        balanceMapper.Updaterecharge(patientId,result);
    }
}




